# -*- coding: utf-8 -*-
# @Time     : 2021/11/29 23:01
# @Author   : wljess
# @File     : win中__main__问题.py
# @Describe : 
# @Software : PyCharm


import os
from multiprocessing import Process


def task(name):
    print(f"子进程pid: {os.getpid()}， 父进程id:{os.getpid()}")
    print(f"we ary singing {name}...")


print(f"主进程id:{os.getpid()}")
p = Process(target=task, args=("黄种人",))
p.start()  # 异步  调用开启进程的方法，但是并不等待这个进程真的开启

print("主进程运行中...")
